<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>生成三角形的星星图案</title>

    <script>
        var str='';
        for(var i = 1;i <= 5; i++){
            for(var j = i; j <= 5; j++){
                str = str + '☆';
            }
            str += '\n';
        }
        console.log(str);
    </script>
</head>
<body>

</body>
</html>